package com.peas.platform.module.icims.contract.initial.adapter.repository.po;

import java.util.*;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 初始合同执行-验收
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_contract_initial_checking`")
public class ContractInitialCheckingPo extends BasePo {

    // 合同ID
    // 【初始合同表】
    @Comment(value = "合同ID")
    @NotNull(message = "合同ID不能为空")
    @TableField(value = "`contract_initial_id`", jdbcType = JdbcType.BIGINT)
    private Long contractInitialId;

    // 批次号
    @Comment(value = "批次号")
    @Size(max = 20, message = "批次号不能超过20个字符")
    @TableField(value = "`batch`", jdbcType = JdbcType.VARCHAR)
    private String batch;

    // 合同验收条件表ID
    // 【合同验收条件表】
    @Comment(value = "合同验收条件表ID")
    @NotNull(message = "合同验收条件表ID不能为空")
    @TableField(value = "`contract_initial_inspection_id`", jdbcType = JdbcType.BIGINT)
    private Long contractInitialInspectionId;

    // 验收内容
    @Comment(value = "验收内容")
    @Size(max = 1000, message = "验收内容不能超过1000个字符")
    @TableField(value = "`content`", jdbcType = JdbcType.VARCHAR)
    private String content;

    // 验收负责人用户ID
    // 【用户表】
    @Comment(value = "验收负责人用户ID")
    @NotNull(message = "验收负责人用户ID不能为空")
    @TableField(value = "`principal_user_id`", jdbcType = JdbcType.BIGINT)
    private Long principalUserId;

    // 监理人用户ID
    // 【用户表】
    @Comment(value = "监理人用户ID")
    @TableField(value = "`supervisor_user_id`", jdbcType = JdbcType.BIGINT)
    private Long supervisorUserId;

    // 验收时间
    @Comment(value = "验收时间")
    @TableField(value = "`checking_time`", jdbcType = JdbcType.TIMESTAMP)
    private Date checkingTime;

    // 验收状态
    // 枚举取值:ContractInitialCheckingState
    @Comment(value = "验收状态", enumType = "ContractInitialCheckingState")
    @Size(max = 20, message = "验收状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 验收意见
    @Comment(value = "验收意见")
    @Size(max = 2000, message = "验收意见不能超过2000个字符")
    @TableField(value = "`checking_comment`", jdbcType = JdbcType.VARCHAR)
    private String checkingComment;

    // 附件
    // 【附件表】
    @Comment(value = "附件")
    @TableField(value = "`checking_attachment_id`", jdbcType = JdbcType.BIGINT)
    private Long checkingAttachmentId;

    // 审批方式
    // 1:线上，2:线下
    @Comment(value = "审批方式")
    @Size(max = 20, message = "审批方式不能超过20个字符")
    @TableField(value = "`approval_type`", jdbcType = JdbcType.VARCHAR)
    private String approvalType;

}
